// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   AccountPeriodTime.java

package finance;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class AccountPeriodTime
{

	private String name[];

	public AccountPeriodTime()
	{
		name = new String[2];
	}

	public String[] getTime(String unit_db_name)
	{
		nseer_db db = new nseer_db(unit_db_name);
		try
		{
			String sql = "select start_time from finance_account_period where account_period='1' order by account_period";
			ResultSet rs = db.executeQuery(sql);
			if (rs.next())
				name[0] = rs.getString("start_time");
			sql = "select end_time from finance_account_period where account_period='12' order by account_period";
			rs = db.executeQuery(sql);
			if (rs.next())
				name[1] = rs.getString("end_time");
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return name;
	}
}
